home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / olectrls.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  16.6 KB  |  375 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'OleCtrls.pas' rev: 3.00
  6.  
  7. #ifndef OleCtrlsHPP
  8. #define OleCtrlsHPP
  9. #include <AxCtrls.hpp>
  10. #include <ComObj.hpp>
  11. #include <Graphics.hpp>
  12. #include <Menus.hpp>
  13. #include <Forms.hpp>
  14. #include <Controls.hpp>
  15. #include <Classes.hpp>
  16. #include <SysUtils.hpp>
  17. #include <ActiveX.hpp>
  18. #include <Messages.hpp>
  19. #include <Windows.hpp>
  20. #include <SysInit.hpp>
  21. #include <System.hpp>
  22.  
  23. //-- user supplied -----------------------------------------------------------
  24.  
  25. namespace Olectrls
  26. {
  27. //-- type declarations -------------------------------------------------------
  28. class DELPHICLASS TEventDispatch;
  29. class DELPHICLASS TOleControl;
  30. struct TControlData;
  31. typedef TControlData *PControlData;
  32.  
  33. typedef short TOleEnum;
  34.  
  35. class DELPHICLASS TEnumPropDesc;
  36. class PASCALIMPLEMENTATION TOleControl : public Controls::TWinControl 
  37. {
  38.     typedef Controls::TWinControl inherited;
  39.     
  40. private:
  41.     void *__IUnknown;    /* IUnknown */
  42.     void *__IOleClientSite;    /* IOleClientSite */
  43.     void *__IOleControlSite;    /* IOleControlSite [TranslateAccelerator=OleControlSite_TranslateAccelerator
  44.         ] */
  45.     void *__IOleInPlaceSite;    /* IOleInPlaceSite [GetWindow=OleInPlaceSite_GetWindow] */
  46.     void *__IOleInPlaceFrame;    /* IOleInPlaceFrame [TranslateAccelerator=OleInPlaceFrame_TranslateAccelerator, 
  47.         GetWindow=OleInPlaceFrame_GetWindow] */
  48.     void *__IDispatch;    /* IDispatch */
  49.     void *__IPropertyNotifySink;    /* IPropertyNotifySink */
  50.     void *__ISimpleFrameSite;    /* ISimpleFrameSite */
  51.     
  52. public:
  53.     operator ISimpleFrameSite*(void) { return (ISimpleFrameSite*)&__ISimpleFrameSite; }
  54.     operator IPropertyNotifySink*(void) { return (IPropertyNotifySink*)&__IPropertyNotifySink; }
  55.     operator IDispatch*(void) { return (IDispatch*)&__IDispatch; }
  56.     operator IOleInPlaceFrame*(void) { return (IOleInPlaceFrame*)&__IOleInPlaceFrame; }
  57.     operator IOleInPlaceSite*(void) { return (IOleInPlaceSite*)&__IOleInPlaceSite; }
  58.     operator IOleControlSite*(void) { return (IOleControlSite*)&__IOleControlSite; }
  59.     operator IOleClientSite*(void) { return (IOleClientSite*)&__IOleClientSite; }
  60.     operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
  61.     
  62. private:
  63.     TControlData *FControlData;
  64.     int FRefCount;
  65.     TEventDispatch* FEventDispatch;
  66.     int FObjectData;
  67.     _di_IOleObject FOleObject;
  68.     _di_IPersistStreamInit FPersistStream;
  69.     _di_IOleControl FOleControl;
  70.     _di_IDispatch FControlDispatch;
  71.     _di_IPerPropertyBrowsing FPropBrowsing;
  72.     _di_IOleInPlaceObject FOleInPlaceObject;
  73.     _di_IOleInPlaceActiveObject FOleInPlaceActiveObject;
  74.     int FPropConnection;
  75.     int FEventsConnection;
  76.     int FMiscStatus;
  77.     Classes::TList* FFonts;
  78.     Classes::TList* FPictures;
  79.     bool FUpdatingPictures;
  80.     bool FUpdatingColor;
  81.     bool FUpdatingFont;
  82.     bool FUpdatingEnabled;
  83.     HIDESBASE HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
  84.     HIDESBASE int __stdcall _AddRef(void);
  85.     HIDESBASE int __stdcall _Release(void);
  86.     HRESULT __stdcall SaveObject(void);
  87.     HRESULT __stdcall GetMoniker(int dwAssign, int dwWhichMoniker, /* out */ _di_IMoniker &mk);
  88.     HRESULT __stdcall GetContainer(/* out */ _di_IOleContainer &container);
  89.     HRESULT __stdcall ShowObject(void);
  90.     HRESULT __stdcall OnShowWindow(BOOL fShow);
  91.     HRESULT __stdcall RequestNewObjectLayout(void);
  92.     HRESULT __stdcall OnControlInfoChanged(void);
  93.     HRESULT __stdcall LockInPlaceActive(BOOL fLock);
  94.     HRESULT __stdcall GetExtendedControl(/* out */ _di_IDispatch &disp);
  95.     HRESULT __stdcall TransformCoords(tagPOINT &ptlHimetric, tagPOINTF &ptfContainer, int flags);
  96.     HRESULT __stdcall OleControlSite_TranslateAccelerator(Windows::PMsg msg, int grfModifiers);
  97.     HRESULT __stdcall OnFocus(BOOL fGotFocus);
  98.     HRESULT __stdcall ShowPropertyFrame(void);
  99.     HRESULT __stdcall ContextSensitiveHelp(BOOL fEnterMode);
  100.     HRESULT __stdcall OleInPlaceSite_GetWindow(/* out */ HWND &wnd);
  101.     HRESULT __stdcall CanInPlaceActivate(void);
  102.     HRESULT __stdcall OnInPlaceActivate(void);
  103.     HRESULT __stdcall OnUIActivate(void);
  104.     HRESULT __stdcall GetWindowContext(/* out */ _di_IOleInPlaceFrame &frame, /* out */ _di_IOleInPlaceUIWindow 
  105.         &doc, /* out */ Windows::TRect &rcPosRect, /* out */ Windows::TRect &rcClipRect, /* out */ tagOIFI 
  106.         &frameInfo);
  107.     HRESULT __stdcall Scroll(const tagPOINT scrollExtent);
  108.     HRESULT __stdcall OnUIDeactivate(BOOL fUndoable);
  109.     HRESULT __stdcall OnInPlaceDeactivate(void);
  110.     HRESULT __stdcall DiscardUndoState(void);
  111.     HRESULT __stdcall DeactivateAndUndo(void);
  112.     HRESULT __stdcall OnPosRectChange(const Windows::TRect &rcPosRect);
  113.     HRESULT __stdcall GetBorder(/* out */ Windows::TRect &rectBorder);
  114.     HRESULT __stdcall RequestBorderSpace(const Windows::TRect &borderwidths);
  115.     HRESULT __stdcall SetBorderSpace(Windows::PRect pborderwidths);
  116.     HRESULT __stdcall SetActiveObject(const _di_IOleInPlaceActiveObject activeObject, wchar_t * pszObjName
  117.         );
  118.     HRESULT __stdcall OleInPlaceFrame_GetWindow(/* out */ HWND &wnd);
  119.     HRESULT __stdcall InsertMenus(HMENU hmenuShared, tagOleMenuGroupWidths &menuWidths);
  120.     HRESULT __stdcall SetMenu(HMENU hmenuShared, HMENU holemenu, HWND hwndActiveObject);
  121.     HRESULT __stdcall RemoveMenus(HMENU hmenuShared);
  122.     HRESULT __stdcall SetStatusText(wchar_t * pszStatusText);
  123.     HRESULT __stdcall EnableModeless(BOOL fEnable);
  124.     HRESULT __stdcall OleInPlaceFrame_TranslateAccelerator(tagMSG &msg, Word wID);
  125.     HIDESBASE HRESULT __stdcall GetTypeInfoCount(/* out */ int &Count);
  126.     HIDESBASE HRESULT __stdcall GetTypeInfo(int Index, int LocaleID, /* out */ void *TypeInfo);
  127.     HIDESBASE HRESULT __stdcall GetIDsOfNames(const GUID &IID, void * Names, int NameCount, int LocaleID
  128.         , void * DispIDs);
  129.     HIDESBASE HRESULT __stdcall Invoke(int DispID, const GUID &IID, int LocaleID, Word Flags, void *Params
  130.         , void * VarResult, void * ExcepInfo, void * ArgErr);
  131.     HRESULT __stdcall OnChanged(int dispid);
  132.     HRESULT __stdcall OnRequestEdit(int dispid);
  133.     HRESULT __stdcall PreMessageFilter(HWND wnd, int msg, int wp, int lp, /* out */ int &res, /* out */ 
  134.         int &Cookie);
  135.     HRESULT __stdcall PostMessageFilter(HWND wnd, int msg, int wp, int lp, /* out */ int &res, int Cookie
  136.         );
  137.     void __fastcall CreateControl(void);
  138.     void __fastcall CreateEnumPropDescs(void);
  139.     void __fastcall CreateInstance(void);
  140.     void __fastcall CreateStorage(void);
  141.     void __fastcall DesignModified(void);
  142.     void __fastcall DestroyControl(void);
  143.     void __fastcall DestroyEnumPropDescs(void);
  144.     void __fastcall DestroyStorage(void);
  145.     void __fastcall GetEventMethod(int DispID, Sysutils::TMethod &Method);
  146.     Menus::TMainMenu* __fastcall GetMainMenu(void);
  147.     System::Variant __fastcall GetOleObject(void);
  148.     _di_IDispatch __fastcall GetDefaultDispatch(void);
  149.     void __fastcall HookControlWndProc(void);
  150.     void __fastcall InvokeEvent(int DispID, tagDISPPARAMS &Params);
  151.     void __fastcall ReadData(Classes::TStream* Stream);
  152.     void __fastcall SetUIActive(bool Active);
  153.     void __fastcall StandardEvent(int DispID, tagDISPPARAMS &Params);
  154.     void __fastcall WriteData(Classes::TStream* Stream);
  155.     HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
  156.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  157.     MESSAGE void __fastcall CMDocWindowActivate(Messages::TMessage &Message);
  158.     HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
  159.     HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
  160.     HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
  161.     HIDESBASE MESSAGE void __fastcall CMDialogKey(Messages::TMessage &Message);
  162.     MESSAGE void __fastcall CMUIActivate(Messages::TMessage &Message);
  163.     MESSAGE void __fastcall CMUIDeactivate(Messages::TMessage &Message);
  164.     void __fastcall D2InvokeEvent(int DispID, tagDISPPARAMS &Params);
  165.     
  166. protected:
  167.     int FEvents;
  168.     virtual void __fastcall CreateWnd(void);
  169.     virtual void __fastcall DefaultHandler(void *Message);
  170.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  171.     virtual void __fastcall DestroyWindowHandle(void);
  172.     Byte __fastcall GetByteProp(int Index);
  173.     Graphics::TColor __fastcall GetColorProp(int Index);
  174.     Graphics::TColor __fastcall GetTColorProp(int Index);
  175.     System::Comp __fastcall GetCompProp(int Index);
  176.     System::Currency __fastcall GetCurrencyProp(int Index);
  177.     double __fastcall GetDoubleProp(int Index);
  178.     _di_IDispatch __fastcall GetIDispatchProp(int Index);
  179.     int __fastcall GetIntegerProp(int Index);
  180.     _di_IUnknown __fastcall GetIUnknownProp(int Index);
  181.     Word __fastcall GetWordBoolProp(int Index);
  182.     System::TDateTime __fastcall GetTDateTimeProp(int Index);
  183.     Graphics::TFont* __fastcall GetTFontProp(int Index);
  184.     Word __fastcall GetOleBoolProp(int Index);
  185.     double __fastcall GetOleDateProp(int Index);
  186.     TOleEnum __fastcall GetOleEnumProp(int Index);
  187.     TOleEnum __fastcall GetTOleEnumProp(int Index);
  188.     System::OleVariant __fastcall GetOleVariantProp(int Index);
  189.     Graphics::TPicture* __fastcall GetTPictureProp(int Index);
  190.     void __fastcall GetProperty(int Index, System::TVarData &Value);
  191.     Shortint __fastcall GetShortIntProp(int Index);
  192.     float __fastcall GetSingleProp(int Index);
  193.     short __fastcall GetSmallintProp(int Index);
  194.     System::AnsiString __fastcall GetStringProp(int Index);
  195.     System::Variant __fastcall GetVariantProp(int Index);
  196.     System::WideString __fastcall GetWideStringProp(int Index);
  197.     Word __fastcall GetWordProp(int Index);
  198.     virtual void __fastcall InitControlData(void) = 0;
  199.     virtual void __fastcall InitControlInterface(const _di_IUnknown Obj);
  200.     void __fastcall InvokeMethod(const void *DispInfo, void * Result);
  201.     DYNAMIC bool __fastcall PaletteChanged(bool Foreground);
  202.     void __fastcall PictureChanged(System::TObject* Sender);
  203.     void __fastcall SetByteProp(int Index, Byte Value);
  204.     void __fastcall SetColorProp(int Index, Graphics::TColor Value);
  205.     void __fastcall SetTColorProp(int Index, Graphics::TColor Value);
  206.     void __fastcall SetCompProp(int Index, const System::Comp Value);
  207.     void __fastcall SetCurrencyProp(int Index, const System::Currency Value);
  208.     void __fastcall SetDoubleProp(int Index, const double Value);
  209.     void __fastcall SetIDispatchProp(int Index, const _di_IDispatch Value);
  210.     void __fastcall SetIntegerProp(int Index, int Value);
  211.     void __fastcall SetIUnknownProp(int Index, const _di_IUnknown Value);
  212.     virtual void __fastcall SetName(const System::AnsiString Value);
  213.     void __fastcall SetWordBoolProp(int Index, Word Value);
  214.     void __fastcall SetTDateTimeProp(int Index, const System::TDateTime Value);
  215.     void __fastcall SetTFontProp(int Index, Graphics::TFont* Value);
  216.     void __fastcall SetOleBoolProp(int Index, Word Value);
  217.     void __fastcall SetOleDateProp(int Index, const double Value);
  218.     void __fastcall SetOleEnumProp(int Index, TOleEnum Value);
  219.     void __fastcall SetTOleEnumProp(int Index, TOleEnum Value);
  220.     void __fastcall SetOleVariantProp(int Index, const System::OleVariant &Value);
  221.     virtual void __fastcall SetParent(Controls::TWinControl* AParent);
  222.     void __fastcall SetTPictureProp(int Index, Graphics::TPicture* Value);
  223.     void __fastcall SetProperty(int Index, const System::TVarData &Value);
  224.     void __fastcall SetShortIntProp(int Index, Shortint Value);
  225.     void __fastcall SetSingleProp(int Index, const float Value);
  226.     void __fastcall SetSmallintProp(int Index, short Value);
  227.     void __fastcall SetStringProp(int Index, const System::AnsiString Value);
  228.     void __fastcall SetVariantProp(int Index, const System::Variant &Value);
  229.     void __fastcall SetWideStringProp(int Index, const System::WideString Value);
  230.     void __fastcall SetWordProp(int Index, Word Value);
  231.     virtual void __fastcall WndProc(Messages::TMessage &Message);
  232.     __property PControlData ControlData = {read=FControlData, write=FControlData};
  233.     
  234. public:
  235.     __fastcall virtual TOleControl(Classes::TComponent* AOwner);
  236.     __fastcall virtual ~TOleControl(void);
  237.     void __fastcall BrowseProperties(void);
  238.     void __fastcall DoObjectVerb(int Verb);
  239.     TEnumPropDesc* __fastcall GetEnumPropDesc(int DispID);
  240.     bool __fastcall GetHelpContext(System::AnsiString Member, int &HelpCtx, System::AnsiString &HelpFile
  241.         );
  242.     void __fastcall GetObjectVerbs(Classes::TStrings* List);
  243.     System::AnsiString __fastcall GetPropDisplayString(int DispID);
  244.     void __fastcall GetPropDisplayStrings(int DispID, Classes::TStrings* List);
  245.     bool __fastcall IsCustomProperty(int DispID);
  246.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  247.     void __fastcall SetPropDisplayString(int DispID, const System::AnsiString Value);
  248.     void __fastcall ShowAboutBox(void);
  249.     __property System::Variant OleObject = {read=GetOleObject};
  250.     __property _di_IDispatch DefaultDispatch = {read=GetDefaultDispatch};
  251.     __property TabStop ;
  252. public:
  253.     /* TWinControl.CreateParented */ __fastcall TOleControl(HWND ParentWindow) : Controls::TWinControl(
  254.         ParentWindow) { }
  255.     
  256. };
  257.  
  258. class PASCALIMPLEMENTATION TEventDispatch : public System::TObject 
  259. {
  260.     typedef System::TObject inherited;
  261.     
  262. private:
  263.     void *__IUnknown;    /* IUnknown */
  264.     void *__IDispatch;    /* IDispatch */
  265.     
  266. public:
  267.     operator IDispatch*(void) { return (IDispatch*)&__IDispatch; }
  268.     operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
  269.     
  270. private:
  271.     TOleControl* FControl;
  272.     HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
  273.     int __stdcall _AddRef(void);
  274.     int __stdcall _Release(void);
  275.     HRESULT __stdcall GetTypeInfoCount(/* out */ int &Count);
  276.     HRESULT __stdcall GetTypeInfo(int Index, int LocaleID, /* out */ void *TypeInfo);
  277.     HRESULT __stdcall GetIDsOfNames(const GUID &IID, void * Names, int NameCount, int LocaleID, void * 
  278.         DispIDs);
  279.     HRESULT __stdcall Invoke(int DispID, const GUID &IID, int LocaleID, Word Flags, void *Params, void * 
  280.         VarResult, void * ExcepInfo, void * ArgErr);
  281.     
  282. public:
  283.     __fastcall TEventDispatch(TOleControl* Control);
  284. public:
  285.     /* TObject.Destroy */ __fastcall virtual ~TEventDispatch(void) { }
  286.     
  287. };
  288.  
  289. struct TEnumValue
  290. {
  291.     int Value;
  292.     System::AnsiString Ident;
  293. } ;
  294.  
  295. typedef TEnumValue TEnumValueList[32768];
  296.  
  297. typedef TEnumValueList *PEnumValueList;
  298.  
  299. class PASCALIMPLEMENTATION TEnumPropDesc : public System::TObject 
  300. {
  301.     typedef System::TObject inherited;
  302.     
  303. private:
  304.     int FDispID;
  305.     int FValueCount;
  306.     TEnumValueList *FValues;
  307.     
  308. public:
  309.     __fastcall TEnumPropDesc(int DispID, int ValueCount, const _di_ITypeInfo TypeInfo);
  310.     __fastcall virtual ~TEnumPropDesc(void);
  311.     void __fastcall GetStrings(Classes::TGetStrProc Proc);
  312.     int __fastcall StringToValue(const System::AnsiString S);
  313.     System::AnsiString __fastcall ValueToString(int V);
  314. };
  315.  
  316. struct TControlData
  317. {
  318.     GUID ClassID;
  319.     GUID EventIID;
  320.     int EventCount;
  321.     void *EventDispIDs;
  322.     void *LicenseKey;
  323.     int Flags;
  324.     int Version;
  325.     int FontCount;
  326.     Activex::TDispIDList *FontIDs;
  327.     int PictureCount;
  328.     Activex::TDispIDList *PictureIDs;
  329.     int Reserved;
  330.     int InstanceCount;
  331.     Classes::TList* EnumPropDescs;
  332. } ;
  333.  
  334. class DELPHICLASS EOleCtrlError;
  335. class PASCALIMPLEMENTATION EOleCtrlError : public Sysutils::Exception 
  336. {
  337.     typedef Sysutils::Exception inherited;
  338.     
  339. public:
  340.     /* Exception.Create */ __fastcall EOleCtrlError(const System::AnsiString Msg) : Sysutils::Exception(
  341.         Msg) { }
  342.     /* Exception.CreateFmt */ __fastcall EOleCtrlError(const System::AnsiString Msg, const System::TVarRec 
  343.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  344.     /* Exception.CreateRes */ __fastcall EOleCtrlError(int Ident, Extended Dummy) : Sysutils::Exception(
  345.         Ident, Dummy) { }
  346.     /* Exception.CreateResFmt */ __fastcall EOleCtrlError(int Ident, const System::TVarRec * Args, const 
  347.         int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  348.     /* Exception.CreateHelp */ __fastcall EOleCtrlError(const System::AnsiString Msg, int AHelpContext)
  349.          : Sysutils::Exception(Msg, AHelpContext) { }
  350.     /* Exception.CreateFmtHelp */ __fastcall EOleCtrlError(const System::AnsiString Msg, const System::TVarRec 
  351.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  352.         ) { }
  353.     /* Exception.CreateResHelp */ __fastcall EOleCtrlError(int Ident, int AHelpContext) : Sysutils::Exception(
  354.         Ident, AHelpContext) { }
  355.     /* Exception.CreateResFmtHelp */ __fastcall EOleCtrlError(int Ident, const System::TVarRec * Args, 
  356.         const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
  357.          { }
  358.     
  359. public:
  360.     /* TObject.Destroy */ __fastcall virtual ~EOleCtrlError(void) { }
  361.     
  362. };
  363.  
  364. //-- var, const, procedure ---------------------------------------------------
  365. extern PACKAGE System::Variant __fastcall FontToOleFont(Graphics::TFont* Font);
  366. extern PACKAGE void __fastcall OleFontToFont(const System::Variant &OleFont, Graphics::TFont* Font);
  367.     
  368.  
  369. }    /* namespace Olectrls */
  370. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  371. using namespace Olectrls;
  372. #endif
  373. //-- end unit ----------------------------------------------------------------
  374. #endif    // OleCtrls
  375.